from django.conf import settings
from django.conf.urls.defaults import *

from django.contrib.auth.views import login, logout

from LiveTrackMap.live.views import welcome

urlpatterns = patterns('',
  (r'^$', welcome, {'template_name': 'index.html'}),
  
  
  (r'^(?P<path>favicon.ico)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
  (r'^media/(?P<path>.*)$',    'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
  
  (r'^live/',  include('live.urls')),
  (r'^map/',   include('map.urls')),
  (r'^track/', include('track.urls')),
  
  (r'^accounts/$',         login, {'template_name': 'accounts/login.html'}),
  (r'^accounts/profile/$', 'django.views.generic.simple.redirect_to', {'url': '/'}),
  (r'^accounts/login/$',   login, {'template_name': 'accounts/login.html'}),
  (r'^accounts/logout/$',  logout),
  
  (r'^admin/', include('django.contrib.admin.urls')),
)
